using System;

using DesignByContract;

namespace Outcoding.GraphGenerator.Entities {
    public class CategoryAxis : IAxis {

        #region Private Helper Classes (1)
        private class Constants {
            public const string DEFAULT_FONT_NAME = "Arial";
            public const int DEFAULT_FONT_SIZE = 12;
            public const bool DEFAULT_FONT_DECORATION_VALUE = false;
        }
        #endregion

        #region Constructors

        public CategoryAxis(){
        }

        #endregion

        private string mFontName = Constants.DEFAULT_FONT_NAME;

        private int mFontSize = Constants.DEFAULT_FONT_SIZE;

        private bool mIsFontBold = true;
        private bool mIsFontItalic = Constants.DEFAULT_FONT_DECORATION_VALUE;
        private bool mIsFontUnderline = Constants.DEFAULT_FONT_DECORATION_VALUE;
        private LabelCollection  mLabels;

        private Label mTitle;

        public LabelCollection  Labels {
            get { return mLabels; }
            set { mLabels = value; }
        }

        public Label Title {
            get { return mTitle; }
            set { 
                mTitle = value; 
            }
        }

        private int mDefaultMarkerSize = 5;

        public int DefaultMarkerSize {
            get { return mDefaultMarkerSize; }
            set { mDefaultMarkerSize = value; }
        }

        private bool mIsSmoothed = false;

        public bool IsSmoothed {
            get { return mIsSmoothed; }
            set { mIsSmoothed = value; }
        }

        public string FontName {
            get {
                return mFontName;
            }
            set {
                mFontName = value;
            }
        }

        public int FontSize {
            get {
                return mFontSize;
            }
            set {
                Check.Ensure(value > 0, "Size value cannot be less than zero.", new ArgumentOutOfRangeException());
                mFontSize = value;
            }
        }

        public bool IsFontBold {
            get {
                return mIsFontBold;
            }
            set {
                mIsFontBold = value;
            }
        }

        public bool IsFontItalic {
            get {
                return mIsFontItalic;
            }
            set {
                mIsFontItalic = value;
            }
        }

        public bool IsFontUnderline {
            get {
                return mIsFontUnderline;
            }
            set {
                mIsFontUnderline = value;
            }
        }
    }
}